# Makefile from 
# http://www.cs.swarthmore.edu/~newhall/unixhelp/javamakefile.html

BUILD = classes
PKGNAME = SOEN_Phase_2
SRC = src/$(PKGNAME)
CLASSFLAG = -cp $(BUILD)
JFLAGS = -g -d $(BUILD)  $(CLASSFLAG)
JC = javac
CLASSES = \
			$(SRC)/DataHelpers.java \
			$(SRC)/Main.java \
			$(SRC)/Person.java \
			$(SRC)/PersonTable.java \
			$(SRC)/Task.java \
			$(SRC)/TaskPro.java \
			$(SRC)/TaskProUI.java \
			$(SRC)/TaskTable.java \
			$(SRC)/TaskCreationDialog.java \
			$(SRC)/NumberFieldValidator.java \
			$(SRC)/TaskDeletionDialog.java


default: classes

classes: $(CLASSES)
	mkdir -p $(BUILD)
	$(JC) $(JFLAGS) $(CLASSES)

clean:
	$(RM) $(BUILD)/$(PKGNAME)/*.class

run:
	java $(CLASSFLAG) $(PKGNAME).Main
